package cn.nyse.ktc_article.service;

import cn.nyse.ktc_article.dao.ArticleDao;
import cn.nyse.ktc_article.entity.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleServiceImpl implements ArticleService{

    @Autowired
    ArticleDao articleDao;


    @Override
    public void save(Article article) {
        articleDao.save(article);
    }

    @Override
    public List<Article> findAllArticle() {
        return articleDao.findAll();
    }

    @Override
    public List<Article> findByArticle(String articleId) {
        return articleDao.findByUserid(articleId);
    }
}
